Optimal. Leaf size=30 \[ -\frac{a^2 x^{-n}}{n}+2 a b \log (x)+\frac{b^2 x^n}{n} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0457713, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118 \[ -\frac{a^2 x^{-n}}{n}+2 a b \log (x)+\frac{b^2 x^n}{n} \]
Antiderivative was successfully verified.
[In] Int[x^(-1 - n)*(a + b*x^n)^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ - \frac{a^{2} x^{- n}}{n} + \frac{2 a b \log{\left (x^{n} \right )}}{n} + \frac{\int ^{x^{n}} b^{2}\, dx}{n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(x**(-1-n)*(a+b*x**n)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.028202, size = 30, normalized size = 1. \[ -\frac{a^2 x^{-n}}{n}+2 a b \log (x)+\frac{b^2 x^n}{n} \]
Antiderivative was successfully verified.
[In] Integrate[x^(-1 - n)*(a + b*x^n)^2,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.021, size = 43, normalized size = 1.4 \[{\frac{1}{{{\rm e}^{n\ln \left ( x \right ) }}} \left ({\frac{{b}^{2} \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{n}}+2\,ab\ln \left ( x \right ){{\rm e}^{n\ln \left ( x \right ) }}-{\frac{{a}^{2}}{n}} \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(x^(-1-n)*(a+b*x^n)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2*x^(-n - 1),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.225097, size = 46, normalized size = 1.53 \[ \frac{2 \, a b n x^{n} \log \left (x\right ) + b^{2} x^{2 \, n} - a^{2}}{n x^{n}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2*x^(-n - 1),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 137.979, size = 175, normalized size = 5.83 \[ \begin{cases} a^{2} x + 2 a b \log{\left (x \right )} - \frac{b^{2}}{x} & \text{for}\: n = -1 \\\left (a + b\right )^{2} \log{\left (x \right )} & \text{for}\: n = 0 \\- \frac{a^{2} n}{n^{2} x^{n} + n x^{n}} - \frac{a^{2}}{n^{2} x^{n} + n x^{n}} + \frac{2 a b n^{2} x^{n} \log{\left (x \right )}}{n^{2} x^{n} + n x^{n}} + \frac{2 a b n x^{n} \log{\left (x \right )}}{n^{2} x^{n} + n x^{n}} + \frac{2 a b n x^{n}}{n^{2} x^{n} + n x^{n}} + \frac{b^{2} n x^{2 n}}{n^{2} x^{n} + n x^{n}} + \frac{b^{2} x^{2 n}}{n^{2} x^{n} + n x^{n}} & \text{otherwise} \end{cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x**(-1-n)*(a+b*x**n)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.221215, size = 51, normalized size = 1.7 \[ \frac{{\left (2 \, a b n e^{\left (n{\rm ln}\left (x\right )\right )}{\rm ln}\left (x\right ) + b^{2} e^{\left (2 \, n{\rm ln}\left (x\right )\right )} - a^{2}\right )} e^{\left (-n{\rm ln}\left (x\right )\right )}}{n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2*x^(-n - 1),x, algorithm="giac")
[Out]